<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{$title}</title>
<link rel="stylesheet" href="Res/boot/css/bootstrap.min.css" type="text/css" media="screen" />
<script type="text/javascript" src="Res/js/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="Res/css/global.css" type="text/css" />
</head>

<body>
<span class="cp_title">{$title}</span>
<div class="table_con" style="margin: 0 auto;text-align: center;">
    <form class="form-horizontal" role="form" action="index.php?c=sys&m=sql_query" method="post">
    <div class="form-group">
        <label class="col-sm-2 control-label">SQL：</label>
        <div class="col-sm-5">
            <div class="textarea">
                <textarea placeholder="支持多条非select语句，但仅支持一条select语句" class="tex" name="sql" id="sql" rows="5" cols="45" style="margin-left: 0px; margin-right: 0px; width: 582px;">{$sql}</textarea>
            </div>
        </div>
    </div> 
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-5">
            <input type="hidden" value="{$token}" name="token" />
            <button type="submit" class="btn btn-primary btn-lg btn-block">查询</button>            
        </div>
    </div>
    <div class="form-group">
        {if $type eq -1}
        <!-- 出错提示-->
        <span style="color: rgb(255, 0, 0);"><strong>错误:</strong></span><br />
        {$error}
        {/if}
        {if $type eq 1}
        <!-- 执行成功-->
        <center><h3>执行成功</h3></center>
        {/if}
        {if $type eq 2}
        <!--有返回值-->
          {$result}
        {/if}
    </div>    
    </form>
</div>
{literal}
<script>    
$(function(){
    $("#sql").focus();
});
</script>
{/literal}
</script>
</body>
</html>

